package nc.tb.bc.entryquery;

import nc.ui.pub.bill.BillCellEditor;

public class EntryQueryCellEditor extends BillCellEditor {
	
	private Object m_value = null;
	
    public EntryQueryCellEditor(final EntryQueryRefPane tbref) {
    	super(tbref);
        delegate = new EditorDelegate() {
            public void setValue(Object value) {
            	m_value = value;
                tbref.setValue((value != null) ? value.toString() : "");
            }
            public Object getCellEditorValue() {
            	return m_value;
            }
        };
    }
    public java.awt.Component getTableCellEditorComponent(
        	javax.swing.JTable table, 
        	Object value, 
        	boolean isSelected, 
        	int row, 
        	int column) {
    	((EntryQueryRefPane)editorComponent).setPosition(row, column);
        delegate.setValue(value);
        return editorComponent;
    }

}
